<?php /* Smarty version 2.6.13, created on 2013-11-28 21:51:08
         compiled from Public/indexheader.html */ ?>
<div id="header" >
	<div class="clear">
	<div class="headerTop">
		<img src="Public/Images/logo.png"/>
	</div>
	<div id="headerBottom">
		<span id="welcome" >欢迎光临&nbsp;<font style="color:#FF9933;">来吃网</font>&nbsp;&nbsp;</span>
		<div id="welcomebottom">
		<?php if ($_SESSION['loginFlag'] == 0): ?>
		<a onclick="javascript:window.open('PwdFind.php?flag=display','pwdfind','width=400,height=400,top=0,left=0,resizable=no');">忘记密码？</a>
			<font style="color:#ccc;">|</font>&nbsp;<a onclick="clickLogin();">登录</a>&nbsp;<font style="color:#ccc;">|</font>&nbsp;<a href="register.php?flag=register">免费注册</a>&nbsp;<font style="color:#ccc;">|</font><a href='ShoppingCar.php?flag=display'>我的购物车</a>
		<?php elseif ($_SESSION['loginFlag'] == 1): ?>	
 			<span>欢迎&nbsp;<font style="color:#FF9933;"><?php echo $_SESSION['user_name']; ?>
</font>&nbsp;登录</span><span style="width:20px;">&nbsp;<font style="color:#ccc;">|</font>&nbsp;<a href="register.php?flag=register">免费注册</a>&nbsp;<font style="color:#ccc;">|</font><a href='ShoppingCar.php?flag=display'>我的购物车</a></span> 
		<?php endif; ?>
			<span><a onClick="javascript:window.external.addFavorite(location.href,document.title)"><img src="Public/Images/shoucan.jpg" id="showcanimg"/>收藏本站</a><font style='color:#ccc;margin-left:5px;margin-right:5px;'>|</font><a onClick=" javascript:this.style.behavior='url(#default#homepage)';this.setHomePage('http://localhost/coming/index.php')">设为首页</a></span>
		</div>
		<div class="headerSearch">
			<form action="HeadSearch.php" method="get">
			<table style="background:#cca;"  >
				<tr>
					<td>
						<select name="serTypeId">
							<option>请选择</option>
							<option value='foodmenu'>美食菜谱</option>
							<option value='1'>节令食品</option>
							<option value='2'>四季食品</option>
							<option value='3'>儿童食品</option>
						</select>
						<script type='text/javascript'>
							$("[name='serTypeId']").val('<?php echo $_GET['serTypeId']; ?>
');
						
						</script>
					</td>
					<td><input  type="text" name="search" class="text"  <?php if ($_GET['search'] != ''): ?> value='<?php echo $_GET['search']; ?>
' <?php endif; ?>/></td>
					<td><input  style="margin-left:3px;margin-right:3px;" type="image" src="Public/Images/search.jpg"/></td>
				</tr>
			</table>
			</form>
		</div>
		
	</div>
	
	</div>
		<div id="main_nav">
				<ul>
				<li><a href="index.php">首页</a>
				</li>
				<li><a href="MenuList.php">美食菜谱</a>
				</li>
				<li><a href="FoodList.php?flag=1">节令食品</a>
				</li>
				<li><a href="FoodList.php?flag=2">四季食品</a>
				</li>
				<li><a href="FoodList.php?flag=3">儿童食品</a>
				</li>	
				<li><a href="#">留言</a>
				</li>
								
				<li><a href="JoinCp.php?cp_id=1">合作加盟</a>
				</li>
				<li><a href="AboutUs.php">关于我们</a>
				</li>
				<?php if ($_SESSION['loginFlag'] == 1): ?>
					<li style="color:#FF9933;float:right; margin-right:10px;margin-top:2px;"><a href="SafeOut.php" >安全退出</a>
					</li>
				<?php endif; ?>
				</ul>		
		</div>
</div>


<div id="flash" >
<?php $_from = $this->_tpl_vars['advData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['v']):
?>
	<?php if ($this->_tpl_vars['v']['adv_position'] == '0'): ?>
	<a href="<?php echo $this->_tpl_vars['v']['adv_link']; ?>
"><img alt="<?php echo $this->_tpl_vars['v']['adv_name']; ?>
" src="Admin/Upload/adv/<?php echo $this->_tpl_vars['v']['adv_pic']; ?>
" title="<?php echo $this->_tpl_vars['v']['adv_name']; ?>
"/></a>
	<?php endif; ?>
<?php endforeach; else: ?>
	请在<font style="color:red;">主文件</font>中包含<font style="color:red;">comming/Public/Include/adv.php</font>,广告信息由这个文件传至模板
<?php endif; unset($_from); ?>
</div>
